Copyright: ® 1995 Kenneth W. Clubb


TMDExplorer
TMDExplorer Component

Copyright 1996 Kenneth W. Clubb.  All rights reserved.

This TMDExplorer software is Shareware. You can use it for 30 days for evaluation purposes, and you can give it to others for evaluation. After that time you must register to continue using TMDExplorer.

Description

Installation

Registration


Properties (def.)
Active

CurrentDataSource

CurrentLevel

DataSource1

DataSource2

DataSource3

DataSource4

DataSource5

DataSource6

DataSource7

DataSource8

DataSources

DescriptionLabel

FieldSeparator


Methods (def.)
Create

Destroy


Procedures (def.)
SyncTables


Events (def.)
OnUpdating


TNotifyUpdatingEvent

Unit

Mdexplor

Declaration

TNotifyUpdatingEvent = procedure (Sender: TObject; Updating: Boolean) of Object;

Description

The TNotifyUpdatingEvent type is the event type for the OnUpdating event of the TMDExplorer.  Updating is True if the TMDExplorer is updating, and False if updating is complete.


TMDExplorer Component PropertiesentProp       MethodsentMethods       ProceduresentProcedures       EventsentEvents
TMDExplorer Component

Properties       Methods       Procedures       Events

Unit

Mdexplor

Description

The TMDExplorer component is a data-aware component that displays master-detail information from multiple datasources as a hierarchical tree.  Each level of the tree is assigned to a single datasource, and up to 8 separate levels are available.  To assign a datasource to the TMDExplorer use DataSource1 through DataSource8.  Set the Active property to False before making assignment changes to the datasources, and set Active back to True to display the results.  The CurrentDataSource property is the datasource of the selected node, and the CurrentLevel property is the level of the selected node, beginning at one.  The DataSources property is a zero-based array of the datasources.  The DescriptionLabel property can be assigned to a TLabel to display field information about the node the mouse is over.  The FieldSeparator property determines what characters separate each field value.

The datasources assigned to a TMDExplorer must be connected together in a master-detail chain.  The TMDExplorer expects these connections to always exist - therefore the function DisableControls cannot be used to disable controls.

Coexisting with slow controls

Special processing is required when a slow single-field control such as a TDBImage is connected to one of the same datasources as TMDExplorer.  A slow control should be disconnected by setting its DataSource property to nil while the TMDExplorer is updating, and then should be re-connected by setting its DataSource back to the appropriate datasource after updating is complete.  This is best done in the OnUpdating event.  Most single-field data-aware controls such as TDBEdit do not slow down TMDExplorer updating, so do not take any special actions unless you notice update problems that must be addressed.

Coexisting with multiple-row controls

Multiple-row controls must be placed on a separate master-detail chain from the TMDExplorer, and synchronized using the procedure SyncTables.  This is because TMDExplorer cannot internally call DisableControls to disable controls as this will also disconnect the master-detail chain.  See SyncTables for a description of how to synchronize the two chains.

Calculated fields

There seems to be a problem with the OnCalcFields event being called. A calculated field is  best "calculated" in the TField's OnGetText event if it is to be displayed by TMDExplorer.

In addition to these properties, methods, and events, this component also has the properties, methods, and events of TOutline. Note, however, that the TOutline is a small window into the entire dataset and you cannot access data that has not been scrolled into view.


Active Property

Applies to

TMDExplorer component

Declaration

property Active : Boolean;

Description

When the Active property is set to True the TMDExplorer responds to changes in the assigned datasources.  When the Active property is set to False, all changes in the assigned datasources are ignored. Because of a bug, you must not save or build a project with Active set to True. You can temporarily set Active to True at design time, but you must set Active back to False before building, and you must set Active to True somewhere within your program.


CurrentDataSource Property

Applies to

TMDExplorer component

Declaration

property CurrentDataSource : TDataSource;

Description

Run-time and read only. Gives the datasource of the selected TMDExplorer item.


CurrentLevel Property

Applies to

TMDExplorer component

Declaration

property CurrentLevel : Integer;

Description

Run-time and read only.  Gives the level of the selected TMDExplorer item.  Level 1 is the root level.


DataSource1 Property
DataSource1... Property

Applies to

TMDExplorer component

Declaration

property DataSource1 : TDataSource;

property DataSource2 : TDataSource;

property DataSource3 : TDataSource;

property DataSource4 : TDataSource;

property DataSource5 : TDataSource;

property DataSource6 : TDataSource;

property DataSource7 : TDataSource;

property DataSource8 : TDataSource;

Description

DataSource1 specifies the datasource assigned to level 1 of the TMDExplorer tree, DataSource2 specifies the same for level 2, and so forth down to DataSource8 which is the datasource for level 8.  DataSources cannot be skipped or repeated. DataSource1 must always be assigned first. The Active property should be set to False while datasources are being assigned, and the set back to True to display the results.


DataSources Property

Applies to

TMDExplorer component

Declaration

property DataSources[Index: Integer] : TDataSource;

Description

Run-time and read only. The DataSources property is an array of assigned datasources and is provided as a convenient way to access assigned datasources by level. The first index begins at zero.


DescriptionLabel Property

Applies to

TMDExplorer component

Declaration

property DescriptionLabel : TLabel;

Description

The DescriptionLabel property defines a TLabel to display the field descriptions of the item the mouse is currently positioned over.


FieldSeparator Property

Applies to

TMDExplorer component

Declaration

property FieldSeparator : String;

Description

The FieldSeparator property is the character string that separates field values for a particular TMDExplorer item.


Create Method

Applies to

TMDExplorer component

Declaration

constructor Create(aOwner : TComponent);override;

Description

Constructs a TMDExplorer object.


Destroy Method

Applies to

TMDExplorer component

Declaration

destructor Destroy(aOwner : TComponent);override;

Description

Destroys a TMDExplorer object.


SyncTables Procedure

Applies to

TMDExplorer component

Declaration

procedure SyncTables(Tab: TTable; RefTab: TTable);

Description

The SyncTables procedure is provided to synchronize two TTables that refer to the same physical table.  This procedure prevents recursion by first checking if the two tables are already at the same row.  If they are not at the same row, then the following is invoked:

Tab.GotoCurrent(RefTab).

This procedure is useful when you have to place a multiple-row control such as a TDBGrid on a separate TDataSource/TTable as a TMDExplorer.  You need to use this procedure in two places - In the TMDExplorer OnUpdating event handler to synchronize the multiple-row control with changes made by TMDExplorer, and in the OnDataChange event handler of the multiple-row control's TDataSource to synchronize the TMDExplorer with changes made by the multiple-row control.  See the sample program for a complete example of how this is done.


OnUpdating Event

Applies to

TMDExplorer component

Declaration

property OnUpdating : TNotifyUpdatingEvent;

Description

The OnUpdating event occurs when the updating state of the TMDExplorer changes.  This is where slow single-field controls should be disconnected and re-connected, and where multiple-row controls on a separate master-detail chain should be synchronized with the TMDExplorer using SyncTables.  If the Updating parameter is True, slow controls should be disconnected by setting there datasources to nil, and if the Updating parameter is False, slow controls should be re-connected and multiple-row controls synchronized with the TMDExplorer.


Installation

The TMDExplorer component is installed in the usual way.  The steps are described below.

Installing the Component

1.	Copy the MDEXPLOR.DCU and CONNECT.DCU files into the \DELPHI\LIB directory or another directory of your choice.

2.	Use the DELPHI Options|Install Components menu item and Add the \DELPHI\LIB\MDEXPLOR.DCU and \DELPHI\LIB\CONNECT.DCU files.

TMDExplorer will be installed into the Data Controls section of the component pallette and TConnections will be installed into the Data Access section of the component pallette.

Installing Help

1.	Copy the MDEXPLOR.HLP and CONNECT.HLP files into the \DELPHI\BIN directory.

2.	Copy the MDEXPLOR.KWF and CONNECT.KWF files into the \DELPHI\HELP directory.

3.	Run the \DELPHI\HELP\HELPINST.EXE program and open the \DELPHI\BIN\DELPHI.HDX file.

4.	Press the + Speedbutton and add \DELPHI\HELP\MDEXPLOR.KWF and \DELPHI\HELP\CONNECT.KWF.

5.	Save the results.


Registration

Registration is $35 US, plus $2 P/H in North America or $5 P/H overseas. The registered version of TMDExplorer does not display the nag screen when a new TMDExplorer component is created and includes the TConnections component free. In addition, you will receive free technical support and free updates for a year.  All technical support will be conducted through Email on Compuserve at the Compuserve address 73047,3064 or the Email address 73047.3064@compuserve.com.  If you have any problems with your order, send an Email message to one of the addresses listed above.

There are two ways to register your TMDExplorer component.

Registration Through Compuserve

From the WinCIM program, GO SWREG and enter registration ID 9212, or search for TMDExplorer.  If you wish to receive your registered version through Email rather than regular mail, send an Email message to Compuserve address 73047,3064 prior to registering.

Credit Card Registration Through PsL

Call PsL at 800-242-4775 and ask to register TMDExplorer, registration number 14381. If you wish to receive your registered version through Email, give your EMail address to PsL at that time.  DO NOT give PsL your Email address if you wish to receive your registered version through regular mail.

You can also register Online over the World Wide Web through PsL.  Go to the Web page http://ourworld.compuserve.com/homepages/clubb to find out more.

NOTE: SUPPORT IS NOT AVAILABLE AT THE PSL TELEPHONE NUMBER. ANY QUESTIONS ABOUT THE STATUS OF THE SHIPMENT OF THE ORDER, REFUNDS, REGISTRATION OPTIONS, PRODUCT DETAILS, TECHNICAL SUPPORT, VOLUME DISCOUNTS, SITE LICENSES, ETC, MUST BE DIRECTED THROUGH EMAIL ONLY AT THE COMPUSERVE ADDRESS OR EMAIL ADDRESS GIVEN ABOVE.

PsL is available 7am-6pm Mon-Thurs and 7am-Noon Friday.